package com.lin.enumtest;

public class da {
    public static void main(String[] args) throws ClassNotFoundException{
        move(Direction.NORTH);
        move(Direction.SOUTH);

        Direction direction = Direction.EAST;
        System.out.println( direction);
    }


    public static void move(Direction direction){
        switch (direction){
            case NORTH:
                System.out.println("向上");
                break;
            case SOUTH:
                System.out.println("向下");
                break;
            case EAST:
                System.out.println("向右");
                break;
            case WEST:
                System.out.println("向左");
                break;
        }
    }
}
